package ljl.codetop300;

public class _offer_10_1 {

  public int fib(int n) {
    int a = 0;
    int b = 1;
    while (n-- > 0) {
      int c = (a + b) % 1000000007;
      a = b;
      b = c;
    }
    return a;
  }
}
